/**
 ********************************************************************
 * @author roocket
 * @file    server.h
 * @version V0.0.0
 * @date    2024/3/22
 * @brief   This file is to indicate server functions. 
 * @attention Code file rules:
 * rule: file encoding use UTF8;
 * rule: max line length 120 characters;
 * rule: line separator \r\n;
 * rule: use clion auto code format tool.
 */

#ifndef _SERVER_H_
#define _SERVER_H_

#include "socket.h"

/* operations for socket of server */
int server_init_socket(const char *address, const unsigned short port);

int server_get_data(int fd, void *user);

int server_set_data(int fd, void *sent, int length);

int server_epoll_handle_data(int fd); 

void server_del_socket(int fd);

#endif /* _SERVER_H_ */
